package sk.fhi.server.handler;

import net.customware.gwt.dispatch.server.ExecutionContext;
import net.customware.gwt.dispatch.shared.DispatchException;
import sk.fhi.shared.rpc.action.GetAction;
import sk.fhi.shared.rpc.result.GetResult;

public class GetHandler extends AbstractActionHandler<GetAction, GetResult>{

	@Override
	public GetResult execute(GetAction arg0, ExecutionContext arg1)
			throws DispatchException {
		return new GetResult(crudService.get(arg0.getEntity().getClass(), arg0.getId()));
	}

	@Override
	public Class<GetAction> getActionType() {
		return GetAction.class;
	}

	
}
